package com.calligraphy.user.from;

import lombok.Data;


import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @Author hy
 * @Date 2018/12/27 10:53
 **/
@Data
public class UserFrom {

    @NotEmpty(message = "用户名必填")
    private String userName;

    @NotEmpty(message = "密码必填")
    private String passWord;

    @Email(message = "请输入正确的邮箱地址")
    private String email;

    @Pattern(regexp="^[a-zA-Z0-9]+$", message="手机号码不能有空格")
    private String phone;

    @NotEmpty(message = "头像必选")
    private String userIcon;

    @NotEmpty(message = "地址必填")
    private String address;

}
